home *** CD-ROM | disk | FTP | other *** search
/ Network Supervisor's Toolkit / Network Supervisor's Toolkit.iso / novell / fyi8 / 073118.dos < prev    next >
Text File  |  1996-07-10  |  2KB  |  45 lines

  1. Number:        A4TH071790U140V52
  2. Subject:       Mapping a Search Drive in a Child Process
  3. Date:          July 25, 1990
  4. OS Version:    All
  5. Shell Version: All
  6. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  7.  
  8. PROBLEM:       This is regarding problems mapping a search drive in a child
  9. process.  Spawned process does not work with shell.  Try this sequence of
  10. commands:
  11.  
  12.       1)  Execute a program that spawns a process for example:
  13.         {
  14.         spawnlp(P_WAIT,"COMMAND.COM","/C".'\O');
  15.         printf("There it goes !!!");
  16.         }
  17.  
  18.       2)  Then type PATH
  19.  
  20.       3)  Then do MAP INS S#:=<server name>/SYS:<directory>
  21.  
  22.       4)  Then type PATH.
  23.  
  24.       At this point it will not update the path.  If you type EXIT and then
  25. do a path, it will show the new drive.
  26.  
  27. SOLUTION:      First of all, it appears that the spawn is working, or you
  28. wouldn't be executing path, map, etc.  Second, the map updates the master
  29. environment only, not the current environment, and not the parent
  30. environment.  When you run the set command, it is looking at the current
  31. environment, which is the spawned DOS.  This is the parent environment when
  32. MAP runs.  However, when the shell was loaded, it located the master
  33. environment and saved a pointer to it.  When map runs, it requests this
  34. pointer of the shell, and uses it to update the environment.
  35.  
  36.                There is no work around for this, as the spawning of
  37. secondary command processors is not a simple matter.  To effectively change
  38. this would require resizeable environments, which DOS does not provide.
  39.  
  40.                In other words, it's not a bug, so there's no FIX.
  41.  
  42.       (X)    This information was verified verbally.
  43.  
  44.       (X)    This information was verified by Engineering.
  45.